<?php

namespace app\adminmini\service;

use app\adminmini\model\Trill;
use think\facade\Db;

class TrillService extends BaseService
{
    public function __construct()
    {
        $this->model = new Trill();
    }


    public function getUserInfo()
    {

        $info = Db::name('customer_trill')->where('store_id', $this->userId())->find();

        if (!$info) {
            $info['client_key'] = '';
        }
        return message("操作成功", true, $info);
    }

    public function updateUserInfo()
    {

        // 参数
        $data = request()->param();

        $data['store_id'] = $this->userId();

        return parent::edit($data); // TODO: Change the autogenerated stub
    }
}